
var Utility = require("../Utility/utility.js");
exports.roleRouter = function(router){


    //角色列表
    router.all('/role/rolelist',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
        res.render('role/rolelist', {
            layout: 'pte/layout-pte',
            active: 'rolelist',
            jscript: 'role/role',
            menulist:menulist,
            comparam:Utility.returnCommonParam(req,res)
        })

        });

    });

    //新增角色

    router.all('/role/addrole',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('role/addrole', {
                layout: 'pte/layout-pte',
                active: 'rolelist',
                jscript: 'role/addrole',
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });


    //权限信息

    router.all('/role/authlist',function(req,res){


        Utility.getMenuList(req,res,function(menulist) {
            res.render('role/authlist', {
                layout: 'pte/layout-pte',
                active: 'rolelist',
                jscript: 'role/authlist',
                role_id:req.param("role_id"),
                menulist:menulist,
                comparam:Utility.returnCommonParam(req,res)
            })

        });

    });



}
